<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="author" content="CarlHuang">
<title>客户降级确认通知</title>
<script language="javascript" src="../script/common.js"
	type="text/javascript"></script>
<script language="javascript" type="text/javascript">
    var qt={};
    function load(){
    	Common.initDict(searchForm.idnoType,"idno_type","全 部");
	  Eui.showNavigation();
	  setPages(["listview"]);
	  createTable();
	}
			
	function createTable(){
	  var columns =[];
	  columns[0]={type:"checkbox"};
	  qt = new QueryTable("grade_change_list4","searchForm","datalist",columns,{
	  buttons:[{value:"不降级",actions:nodown},{value:"降级并通知",actions:down}]});
	  qt.showTable();
	}
	
	function showData(){
					createTable();		//qt为全局的QueryTable对象
		}	
					
		//降级并通知
	function down(){
	  var	id = qt.getBoxValue();
	  if(id==null||id==""){
      showWarning("请选择要降级并通知的数据");return;
      }
	  if(showQuestion("确定要降级并通知吗?")==false){
	  return;
	  }  	 
	  var ids = id.split(",");	
	  DWR.call('gradeService.gradeDownByIds',ids,function(){
	  showInformation("降级并通知成功!");
	  load();
	  qt.showTable();
	  },{blockScreen:"true"});
	   switchPage('listview');
	}
	
			//不降级
	function nodown(){
	  var	id = qt.getBoxValue();
	  if(id==null||id==""){
      showWarning("请选择不降级的数据");return;
      }
	  if(showQuestion("确定要不降级吗?")==false){
	  return;
	  }  	 
	  var ids = id.split(",");
	  DWR.call('gradeService.gradeNoDownByIds',ids,function(){
	  showInformation("不降级数据已提交审核!");
	  load();
	  qt.showTable();
	  },{blockScreen:"true"});
	  switchPage('listview');
	}
			
</script>
</head>
<body onload="load()">
<!--页面导航-->
<div class=" nav ">
<div id="nav">&nbsp;</div>
</div>

<div id=listview>
<div class="formTitle">客户降级确认</div>
<div class="searchForm">
<form name="searchForm" id="searchForm">
<table cellSpacing="0" cellPadding="4" width="100%" border="0"
	class="col2 label6">
	<tr>
		<td><label>卡号</label> <input type="text" name="cardasn" id="cardasn"   value=""  onblur="checkV(this,'asn')"  /></td>
		<td><label>客户姓名</label> <input type="text" name="name" id="name"   value=""   /></td>
	</tr>
	<tr>
	    <td><label>证件类型</label> <select name="idnoType" onchange="checkV(searchForm.idno,this.value)"></select></td>
    	<td><label>证 件 号</label> <input type="text" name="idno" onblur="checkV(this,searchForm.idnoType.value)"></td>
	</tr>
	<tr>
		<td></td><td>
		<button type="button" onclick="showData()">查询</button>
		</td>
	</tr>
</table>
</form>
</div>
<div id=datalist></div>

</body>
</html>
